import Vue from "vue";
import VueRouter from "vue-router";

import Home from "../components/Home";
import Index from "../view/admin/Index"
import First from "../view/admin/First";
import Sec from "../view/admin/Sec";
import Third from "../view/admin/Third";
import User from "../view/admin/User";

Vue.use(VueRouter);

export default new VueRouter({
    routes: [
        {
            path: '/',
            component: () => import("@/components/Home.vue"),
        },
        {
            path: '/admin',
            component: Index,
            children: [
                {
                    path: 'first',
                    component: First,
                },
                {
                    path: 'sec',
                    component: Sec,
                },
                {
                    path: 'third',
                    component: Third,
                },
                {
                    path: 'user',
                    component: User,
                },
            ]
        }

    ]
})
